<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
require_once APPPATH.'libraries/facebook/facebook.php';
class Tab extends CI_Controller {

  public function __construct(){
    parent::__construct();
    global $facebook;
    if (isset($_REQUEST['signed_request'])) {
      $signed_request = parse_signed_request($_REQUEST['signed_request'], FB_APP_SECRET);
      if(isset($signed_request['app_data'])) {
        redirect(str_replace(',', '/', $signed_request['app_data']));
      }
    }

    // $this->output->enable_profiler(TRUE);
  }

	public function index()
	{
	  $this->load->view('header');
		$this->load->view('welcome_message');
		$this->load->view('footer');
	}

	public function tos() {
		$this->load->view('tos');
	}

  public function learn_more() {
		$this->load->view('learn_more');
	}

  public function privacy() {
		$this->load->view('privacy');
	}
}

/* End of file tab.php */
/* Location: ./application/controllers/tab.php */